package com.whalefin.persistence;

import com.whalefin.domain.Reply;

import java.util.List;

/**
 * 用户相关 Table =  Reply
 *
 * @author sf
 */
public interface ReplyMapper {

    /**
     * 评论，回复
     * @return
     */
    public int replyMsg(Reply reply);

    /**
     * 留言回复数
     * @param LeaveMessageId
     * @return
     */
    public int queryReplyCount(Integer LeaveMessageId);

    /**
     * 广告回复数
     * @param advertiseId
     * @return
     */
    public int queryReplyAdCount(Integer advertiseId);

    /**
     * 查询留言的所有评论(回复)，targetUserId =0
     * @return
     */
    public List<Reply> queryAllReply();

    /**
     * 查询所有广告的评论
     * @return
     */
    public List<Reply> queryAllReplyAd();

    /**
     * 根据留言id查询对应该留言的评论,回复
     * @param leaveMessageId
     * @return
     */
    public List<Reply> queryReplyByLeaveMessageId(Integer leaveMessageId);

    /**
     * 根据广告id查询对应广告评论，回复
     * @param advertiseId
     * @return
     */
    public List<Reply> queryReplyByAdvertiseId(Integer advertiseId);


    public int insertCirclePush(Integer leaveMessageId,Integer advertiseId,String content,Integer userId,Integer targetUserId,String pubTime,Integer isRead);



}
